<template>
  <div>
        <tabs-component 
            :tabs="tabList" 
            :ontabs="ontabs"
        ></tabs-component>
  </div>

</template>
<script>
//懒加载写法
const demo1Component = () => import('./../components/demo1');
const demo2Component = () => import('./../components/demo2');
let tabList = [
    {
        to: 'demo1',
        text: 'demo1',
        component: demo1Component,
        //是否已经渲染过
        is:false,
        active:false
    },
    {
        to: 'demo2',
        text: 'demo2',
        component: demo2Component,
        is:false,
        active:false
    }
];
import tabsComponent from "./../components/tabs.component";
export default {
  data(){
      return {
          tabList : tabList
      }
  },
  components:{
      tabsComponent
  },
  methods:{
      ontabs(params){
          console.log(params)
      }
  }
}
</script>
